import React,{useEffect} from 'react'
import * as echarts from "echarts"
import sichuan from "../../assetst/json/province/sichuan.json"
export default function SicuanMap() {
  useEffect(()=>{
    echartsInit()
  },[])
  const echartsInit=()=>{
    const myChart = echarts.init(document.getElementById("main"))
    // 注册地图
    echarts.registerMap("sicuan",sichuan);
    const option={
      series:[
        {
          type:"map",
          map:"sicuan",
          label:{
              show:true,
              fontSize:5
          }
      }
      ]
    }
    myChart.setOption(option)
  }
  return (
    <div>
        
    </div>
  )
}
